<template>
	<view style="width: 100%; height: 100%;">
		<uni-file-picker 
			:limit="limit" 
			:del-icon="false" 
			:disable-preview="disablePreview" 
			:imageStyles="imageStyles"
			:list-styles="listStyles"
			file-mediatype="image"
		>
			<view class="upload-file-box">
				<view class="icon">
					+
				</view>
			</view>
		</uni-file-picker>
	</view>
</template>

<script>
	export default {
		name: "upload-file",
		props: {
			limit: {
				type: Number,
				default: () => 1
			},
			disablePreview: {
				type: Boolean,
				default: () => false
			},
			imageStyles: {
				type: Object,
				default: {
					width: 104,
					height: 104,
					"border":{ // 如果为 Boolean 值，可以控制边框显示与否
						"color":"#eee",		// 边框颜色
						"width":"1px",		// 边框宽度
						"style":"solid", 	// 边框样式
						"radius":"20rpx" 		// 边框圆角，支持百分比
					}
				}
			}
		},
		data() {
			return {

			};
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
.upload-file-box {
	width: 206rpx;
	height: 206rpx;
	border: 2rpx solid #333;
	// border-radius: 20rpx;
	background-color: #F5F5F5;
	display: flex;
	align-items: center;
	justify-content: center;
}
</style>